/*
 * Ext JS Library 2.2.1
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

TabContainerPanel = function(){
    

    this.ReleaseFeedGrid = new ReleaseFeedGrid(this);
    this.FeedGrid = new FeedGrid(this);
    this.PirateBayGrid = new PirateBayGrid(this); //should be programatic to support multiple search providers
    this.TorrentsGrid = new TorrentsGrid(this);
    this.HomePanel = new Ext.Panel({region: 'center'});
    
    
    TabContainerPanel.superclass.constructor.call(this, {
        id:'main-tabs',
        activeTab:0,
        region:'center',
        margins:'0 5 5 0',
        resizeTabs:true,
        tabWidth:150,
        minTabWidth: 120,
        enableTabScroll: true,
        plugins: new Ext.ux.TabCloseMenu(),
        items: [{
            id:'tab-welcome',
            layout:'border',
            title:'BotTorrent Home',
            hideMode:'offsets',
            items:[this.HomePanel]
        },{
            id:'tab-mytorrents',
            layout:'border',
            title:'My Torrents',
            hideMode:'offsets',
            items:[this.TorrentsGrid]
        },{
            id:'tab-feeds',
            layout:'border',
            title:'News Feeds',
            hideMode:'offsets',
            items:[this.FeedGrid]
        },{
            id:'tab-releases',
            layout:'border',
            title:'Release Feeds',
            hideMode:'offsets',
            items:[this.ReleaseFeedGrid]
        },
        {
            id:'tab-piratebay',
            layout:'border',
            title:'PirateBay Search',
            hideMode:'offsets',
            items:[this.PirateBayGrid]
        }
        ]
    });

   


};

Ext.extend(TabContainerPanel, Ext.TabPanel, {

   
   

    

//    exampleFunction : function(){
//        this.beginUpdate();
//        this.grid.store.data.each(this.openTab, this);
//        this.endUpdate();
//    }
});